/*
 * Copyright 2009-2010 the original author or authors.
 *
 * Licensed under the Apache license, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.internna.iwebjtracker.project.validation;

/**
 * An enumeration of all known system errors. For each error indicates a 
 * i18n key.
 *
 * @author Jose Noheda
 * @since 1.0
 */
public enum Errors {

    MISSING_INFO("validation.all.missing"),
    NULL_ISSUE("validation.issue.null"),
    ISSUE_CLOSED("validation.issue.closed"),
    NULL_ISSUE_TYPE("validation.issue.nullType"),
    NULL_SEVERITY("validation.issue.nullSeverity"),
    NULL_MODULE("validation.issue.nullModule"),
    NULL_VERSION("validation.issue.nullVersion"),
    VERSION_CLOSED("validation.version.closed"),
    ISSUE_EQUALS("validation.issue.bothEquals"),
    ISSUE_LINK_EXISTED("validation.issue.linkExisted"),
    ISSUE_HAS_NO_SUMMARY("validation.issue.emptySummary"),
    NOT_A_POM("validation.project.maven.notapom"),
    INVALID_POM("validation.project.maven.invalidpom"),
    NULL_PROJECT_VALIDATION("validation.project.null"),
    PROJECT_OPEN("validation.project.open"),
    PROJECT_CLOSED("validation.project.closed"),
    PROJECT_HAS_NO_NAME("validation.project.noname"),
    PROJECT_HAS_NO_HOME("validation.project.nohome"),
    PROJECT_HAS_NO_VERSION("validation.project.noversion"),
    PROJECT_NOT_A_FOLDER("validation.project.notfolder"),
    PROJECT_DOES_NOT_EXIST("validation.project.notexists"),
    PROJECT_NOT_A_DEVELOPER("validation.project.notdeveloper"),
    PROJECT_NOT_AN_ADMINISTRATOR("validation.project.notadmin"),
    CONNECTION_FAILED("validation.project.connection.failed"),
    NULL_CONNECTION_DETAILS("validation.project.nullConnection"),
    INVALID_SERVER_TYPE("validation.project.invalid.servertype"),
    INVALID_PROJECT_TYPE("validation.project.invalid.projecttype");

    private final String value;

    private Errors(String val){
        this.value = val;
    }

    /**
     * @return the i18n key
     */
    @Override public String toString() {
        return value;
    }

}
